import request from '@/utils/request'

// 查询收入記錄列表
export function listIncome(query) {
  return request({
    url: '/biz/income/list',
    method: 'get',
    params: query
  })
}

// 查询收入記錄详细
export function getIncome(id) {
  return request({
    url: '/biz/income/' + id,
    method: 'get'
  })
}

// 新增收入記錄
export function addIncome(data) {
  return request({
    url: '/biz/income',
    method: 'post',
    data: data
  })
}

// 修改收入記錄
export function updateIncome(data) {
  return request({
    url: '/biz/income',
    method: 'put',
    data: data
  })
}

// 删除收入記錄
export function delIncome(id) {
  return request({
    url: '/biz/income/' + id,
    method: 'delete'
  })
}

export function getAccountSubjectTree() {
  return request({
    url: '/system/dict/data/accountSubjectTree',
    method: 'get'
  })
}
